<h1 class="inline">
	All Users
</h1>

<hr />

<table class="top_spaced">
	<tr>
		<th>Username</th>
		<th class="centered">User Commands</th>
		<th class="centered">Queries</th>
		<th>Signup Date</th>
	</tr>
	
	<% for user in @users %>
		<tr <%= cycle('class="offset"', '') -%>>	
			<td><b><%= user_link(user) %></b></td>
			<td class="centered"><%= user.user_commands_count.to_i.zero? ? "<span class=\"faded\">0</span>" : link_to(user.user_commands_count, specific_user_commands_path(user)) %></td>
			<td class="centered"><%= user[:queries_count].zero? ? "<span class=\"faded\">0</span>" : link_to(user[:queries_count], user_queries_path(user)) %></td>
			<td><%= time_ago_in_words_or_date user.created_at %></td>
		</tr>
	<% end %>
</table>

<%= will_paginate @users %>